{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import the libraries\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import cv2\n",
    "import skimage.io as io"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "mean_01=np.array([-7.0,6.0])\n",
    "\n",
    "cov_01=np.array([[2.0,0.0],\n",
    "                 [0.0,2.0]])\n",
    "\n",
    "mean_02=np.array([5.0,7.0])\n",
    "\n",
    "cov_02=np.array([[1.0,0.0],\n",
    "                 [0.0,1.0]])\n",
    "\n",
    "\n",
    "mean_03=np.array([0.0,-6.0])\n",
    "\n",
    "cov_03=np.array([[1.0,0.0],\n",
    "                 [0.0,1.0]])\n",
    "\n",
    "data_01=np.random.multivariate_normal(mean_01,cov_01,200)\n",
    "data_02=np.random.multivariate_normal(mean_02,cov_02,200)\n",
    "data_03=np.random.multivariate_normal(mean_03,cov_03,200)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7fb705031978>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD8CAYAAAB+UHOxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJztnX+UFdWV77+7Lxe4ENONkQRsIOrEIS+EX7EfYaIyMWYwigohCvrmh3nJG56TyRp18hghukxH8wSHN1GyMomLvGSNyfgSiD+QiAZM9D2Ms/zR/FQTiIgotGhIsDva3qZ/7fdHVXXXrV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ZhnlGw23s72M3rO9nVbBNUHMBPONz+c9EZK+IPCoiMyo6sFwK/S5r7bt5FcyTvYo/07qpCCYivwDgV2X7JlV9qNLjCUPIMV+N4Nn/earaKSLvB/CYiOxX1R2VGieA7wK4DdYf2m2wzFVfiPP+UQjzTEXkJgADAO41dFP2Z1rviMh7ANwP4HpV/aPn8i5YJox3bJ/QZgBnV3qMNnXzu7R9i5cDWO1zuSrPtG4UgKp+uoi3dQKY6no9xT7n5g+wloWj7FmXX5uiKDRmERkFYCmAcwL66LR//k5EHoRlSoj1Cx722YrI9wA87HMpzHOOhRDP9PMALgVwodrGVZ8+yv5MfQjzjJw2R+3vRjOs72dFEZE0LOF/r6o+4L3uVgiq+oiIfEdETlPViufeCfG7rNh3MwQXA9ilqm96L1TrmTa6CWgLgKvs6IozYWnUZ90NbCHxBIAr7FPXAKjUiuLTAPar6lG/iyIyXkROcY5hOTlfqNDYnDG47aWfNdz/OQBnixVNNRrWMndLJcbnRkQ+A+CfAFyuqu8a2lTrmYZ5Rltgff8A6/v4uEmJlQvb5/B9AL9R1W8a2kxyfBMiMg+WHKmGogrzu9wC4G/saKD5ALpV9ViFh+pgXO1X7ZlW0yMe139YgukogJMA3gSwzXXtJljRFwcAXOw6/wiA0+3js2AphoMAfgpgTIXG/W8ArvWcOx3AI65x7bX/vwjLzFHpZ/sjAM8D2Afrj2myd5z260tgRYy8XI1x2mM4CMveu8f+f7d3rNV8pn7PCMCtsBQWAIy1v38H7e/jWVV4hufBMvftcz3HSwBc63xXAXzZfnZ7YTnbP1Gl37fv79IzVgHwr/Yzfx6uKMEKj3U8LIHe7DpX9WfKncCEEJJQGt0ERAghxAAVACGEJBQqAEIISShUAIQQklCoAAghJKFQARBCSEKhAiCEkIRCBUAIIQnl/wPsBjehKCtGlgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(data_01[:,0],data_01[:,1])\n",
    "plt.scatter(data_02[:,0],data_02[:,1])\n",
    "plt.scatter(data_03[:,0],data_03[:,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(600, 2)\n"
     ]
    }
   ],
   "source": [
    "X = np.concatenate((data_01,data_02,data_03),axis=0)\n",
    "print(X.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{0: {'points': [], 'color': 'green', 'center': array([-9.77946465, -2.61079022])}, 1: {'points': [], 'color': 'yellow', 'center': array([-0.49947731, -1.75133668])}, 2: {'points': [], 'color': 'blue', 'center': array([-1.32134982, -5.70145057])}}\n"
     ]
    }
   ],
   "source": [
    "#Create initial clusters , should contain pt , and cluster info\n",
    "# we use dict with key class_id and values will be another dict\n",
    "\n",
    "k = 3\n",
    "\n",
    "colors = ['green' , 'yellow', 'blue']\n",
    "clusters={}\n",
    "for kx in range(k):\n",
    "    center = 10.0*(np.random.random((2,))-1)\n",
    "    points = []\n",
    "    cluster = {\n",
    "        'center' : center,\n",
    "        'points' : points,\n",
    "        'color'  : colors[kx]\n",
    "    }\n",
    "    clusters[kx]=cluster\n",
    "print(clusters)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def distance (v1,v2):\n",
    "    return np.sqrt(np.sum((v1-v2)**2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD8CAYAAAB+UHOxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5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knvaNgrA3d9Qx8eeBF4Ze/+K8FiccYJl4bJw1pXUpi5qjdnMlgEbgEsy+ngyfP6ZmX2KwJRQ6g887701s78FPptwKs99LoUc9/TdwFuAdR4aVxP6WPB7mkCeexS1eSL8bawi+H02FTNbTiD8R939rurzcYXg7gfMbKeZrXH3pufeyfG3bNpvMwdXAA+6+0+rT7Tqni51E9A9wNVhdMW5BBr1m/EGoZD4J+Dt4aGNQLNWFG8AvufuTySdNLMVZnZW9JrAyflIk8YWjSFuL31byvW/BZxnQTRVD8Ey955mjC+Omb0JeB/we+5+MqVNq+5pnnt0D8HvD4Lf4z+mKbGFIvQ53Ap8193/MqXNyyLfhJldSiBHWqGo8vwt7wHeFUYD/Rpwwt2favJQI1JX+y27p630iJf1IBBMTwDPAz8FPhc7t40g+uL7wBWx4weAl4evX0WgGI4C/w94QZPG/X+BTVXHXg4ciI3rcPj4DoGZo9n3dh9wBPg2wT/T2dXjDN+vJ4gY+WErxhmO4SiBvffh8LGreqytvKdJ9wi4mUBhAbww/P0dDX+Pr2rBPXw9gbnv27H7uB7YFP1WgfeG9+4wgbP9v7bo7534t6waqwF/E97zI8SiBJs81hUEAn1V7FjL76l2AgshRIey1E1AQgghUpACEEKIDkUKQAghOhQpACGE6FCkAIQQokORAhBCiA5FCkAIIToUKQAhhOhQ/j/BVGaN3B0s+wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "for ix in range(X.shape[0]):\n",
    "    dist = []\n",
    "    curr_x = X[ix]\n",
    "    \n",
    "    for kx in range(k):\n",
    "        d=distance(curr_x,clusters[kx]['center'])\n",
    "        dist.append(d)\n",
    "    current_cluster_id = np.argmin(dist)\n",
    "    \n",
    "    clusters[current_cluster_id]['points'].append(curr_x)\n",
    "    \n",
    "for kx in range(k):\n",
    "    pts = np.array(clusters[kx]['points'])\n",
    "    clusters[kx]['coords']=pts\n",
    "\n",
    "plt.figure(0)\n",
    "\n",
    "for kx in range(k):\n",
    "    pts = clusters[kx]['coords']\n",
    "    try:\n",
    "        plt.scatter(pts[:,0],pts[:,1], color=clusters[kx]['color'])\n",
    "    except:\n",
    "        pass\n",
    "    center = clusters[kx]['center']\n",
    "    plt.scatter(center[0],center[1],color='black',s=100,marker='*')\n",
    "    \n",
    "    \n",
    "for kx in range(k):\n",
    "    if clusters[kx]['coords'].shape[0] > 0:\n",
    "        new_center = clusters[kx]['coords'].mean(axis=0)\n",
    "    else:\n",
    "        new_center = clusters[kx]['center']\n",
    "    clusters[kx]['center'] = new_center\n",
    "    clusters[kx]['points'] = []"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
